program olimp1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  i,j,k,n,max,min:integer;
  fin,fout:textfile;
begin
  assignfile(fin,'input.txt');
  assignfile(fout,'output.txt');
  read(fin,n);
  read(fin,k);
  max:=n-k+1;
  if n mod k=0 then
    min:=n div k
  else
    min:=(n div k)+1;
  write(fout,min,' ',max);
  close
end.
